package com.example.demo;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-08-01
 * Time: 9:43
 */
@Controller
@ResponseBody
public class TestController {
    //从配置项读取配置
    @Value("${null.value}")
    //赋值给一个变量
    private String way;

    @RequestMapping("/sayhi")
    public String sayHi(){
        return "hello ,world"+""+way;
    }
}
